Skip to content

Instantly share code, notes, and snippets.

@danielrbradley
danielrbradley / IsinValidation.fs
Created December 6, 2016 16:33
Validate an ISIN (International Securities Identification Number) in F#
module Isin
open System.Text.RegularExpressions
// See: http://en.wikipedia.org/wiki/International_Securities_Identification_Number
[<Literal>]
let private AsciiZero = 48
[<Literal>]
let private AsciiNine = 57
@sshymko
sshymko / redis.service
Last active May 8, 2024 14:56
Redis service for systemd on Linux
[Unit]
Description=Redis persistent key-value storage
After=network.target
[Service]
Type=notify
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd --daemonize no
ExecStop=/usr/bin/redis-cli -p 6379 shutdown
ExecReload=/bin/kill -USR2 $MAINPID
Restart=always
@HexedHero
HexedHero / mc_client_performance_guide.md
Last active May 8, 2024 14:55
Performance guide for Minecraft 1.20.4+ Clients

Performance guide for Minecraft 1.20.4+ Clients

πŸ“œ Fabric

Fabric is the "modern" Minecraft modding software that is very modular.
We use Fabric in this guide so install it by going to https://fabricmc.net/use/ Download the .jar or .exe and run it.

Below is a list of performance and utility mods to make your Minecraft experience better and most importantly smooth.
The list is in order of most importance and they all work together including what they do with why to use them.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 8, 2024 14:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ovidiudeica
ovidiudeica / A.suma_fisier.cpp
Last active May 8, 2024 14:54
Algoritmi cu fisiere in C++
// suma a 2 numere in fisier
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int a, b;
// deschide fisierul pentru scriere:
@mkocikowski
mkocikowski / gist:aeca878d58d313e902bb
Last active May 8, 2024 14:52
Setting up Redis to run as a daemon under systemd

This can be used to daemonize anything that would normally run in the foreground; I picked Redis. Put this in /etc/systemd/system/redis.service:

[Unit]
Description=Redis
After=syslog.target

[Service]
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
RestartSec=5s
@maxwellmlin
maxwellmlin / LPX-Trial-Reset.sh
Created April 14, 2021 03:46
Logic Pro X Trial Reset
mv -v ~/Library/Application\ Support/.lpxuserdata ~/.Trash
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 8, 2024 14:51
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@voluntadpear
voluntadpear / remote-work-py.md
Last active May 8, 2024 14:49
Trabajo remoto desde Paraguay
def check_missing_data(df):
# Check for missing values
proportion_null_rows = 100*(round(df.isnull().any(axis=1).sum()/df.any(axis=1).count(),2))
if proportion_null_rows <= 5:
print(f"There are {df.isnull().any(axis=1).sum()} rows with a null value. All of them are erased!")
df.dropna()
else:
print("Too many null values, we need to check columns by columns further.")
if df.isnull().sum().sum() > 0:
print("\nProportion of missing values by column")